package test_package;

import junit.framework.Assert;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;


public class RezetkaOrderTestPositive extends PrePostConditions{

    @Test
    @Parameters({"name", "mobile", "email"})


    public void testOrder(String name, String mobile, String email){

        //start from home page
        HomePage home = new HomePage(driver);
        //navigate to product search result page
        ResultPage result = home.search("ipad");
        //press bey! button for the first link
        CartWindow cart = result.pressBuyForFirstLink();
        //press checkout button
        CheckoutPage checkout  = cart.pressCheckoutButton();

        ConfirmationPage confirm= checkout.fillInDataPositive(name, mobile, email);

        Assert.assertTrue(confirm.checkConfirmOrderButton());


    }


}